import TeacherModel from './teacherModel';

// eslint-disable-next-line
export const insertData = function (data, callback) {
  const teacherInfo = new TeacherModel(data);
  teacherInfo
    .save((err) => {
      if (err) {
        console.error('insert error xxxxxxxxxx=>');
        console.error(err);
        console.error('<=xxxxxxxxxx insert error');
      }
      if (typeof callback === 'function') {
        callback();
      }
    });
}

